<?php


namespace app\api\controller;


use app\common\business\Goods;
use app\common\lib\Show;

class Index extends ApiBase
{

    //获取轮播图
    public function getRotationChart()
    {
        $result = (new Goods())->getRotationChart();
        return Show::success($result);

    }


    //获取首页栏目推荐的商品
    public function cagegoryGoodsRecommend()
    {
        //定义选择商品
        $categoryIds = [
            21,
            34,
            23
        ];


        $reult = (new Goods())->cagegoryGoodsRecommend($categoryIds);

        return Show::success($reult);
    }
}